<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>
</head>
<body>
<?php
error_reporting(0);
include 'conn/conn.php';
if(isset($_REQUEST['submit'])){
    $id = (trim($_REQUEST['hidUserID']));
$strProducts = (trim($_REQUEST['strProducts']));
$strsubProducts = (trim($_REQUEST['strsubProducts']));
$txtYear = (trim($_REQUEST['txtYear']));
$txtSeries = (trim($_REQUEST['txtSeries']));

$msg = "";
    if ($strProducts == "") {
        $msg = "enter product name first";
    } else if ($strsubProducts == "") {
        $msg = "enter sub product name";
    } else if ($txtYear == "") {
        $msg = "enter year";
    } else if ($txtSeries == "") {
        $msg = "enter series";
    } else {
        
        $sql = "INSERT INTO tbl_products_vehicle (id, Products, SubProducts, Year, Series, is_active) VALUES('$id' , '$strProducts' , '$strsubProducts', '$txtYear', '$txtSeries' , 'Y')";
    
        $sql_db=mysql_query($sql)
                or die(mysql_error());
    }
  }  
    if($sql_db)
    {
        header("Location:imageupload.php?id=");
    }
else
{
    header("Location:products.php?$msg1=failure");
}

?>



</body>
</html>







